home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…tion Library 4 (Reseller) / Apple Ref. & Pres. Lib.v4.0.iso / 6-Apple⁄DEC Alliance / Solutions & Networking Guide / Macintosh Networking Guide / Macintosh Networking Guide / stack.txt < prev   
Text File  |  1990-04-17  |  9KB  |  286 lines

  1. -- stack: in
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 402488951
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 8
  11. -- first background id: 2585
  12. -- card count: 28
  13. -- first card id: 6353
  14. -- list block id: 4562
  15. -- print block id: 10182
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 0
  19. -- free size: 0 bytes
  20. -- total size: 480992 bytes
  21. -- stack block size: 7680 bytes
  22. -- created by hypercard version: 0x01228000
  23. -- compacted by hypercard version: 0x01228000
  24. -- modified by hypercard version: 0x01228000
  25. -- opened by hypercard version: 0x01228000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8A552255A8552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0x55AA55AA55AA55AA
  48. -- patterns[22]: 0x4010040140100401
  49. -- patterns[23]: 0x0618608106186081
  50. -- patterns[24]: 0x00FF00FF00FF00FF
  51. -- patterns[25]: 0x2A00AA00AA00AA00
  52. -- patterns[26]: 0xAA44AA11AA44AA11
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0x55FF55FF55FF55FF
  56. -- patterns[30]: 0x729C27C9729C27C9
  57. -- patterns[31]: 0x73DC37CD73DC37CD
  58. -- patterns[32]: 0x6018068160180681
  59. -- patterns[33]: 0x0208208002082080
  60. -- patterns[34]: 0x2A00AA00A200AA00
  61. -- patterns[35]: 0x2200AA002200AA00
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xAA40AA00AA04AA00
  64. -- patterns[38]: 0xAA44AA10AA44AA00
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  69. --‚â•
  70. --‚â•
  71. --‚â•
  72. --‚â•                ¬© 1990, Apple Computer, Inc.
  73. --‚â•
  74. --‚â•                 Macintosh Networking Guide
  75. --‚â•            Interface for connectivity solutions.
  76. --‚â•                          4/12/90
  77. --‚â•
  78. --‚àÜ                        J.W. Swartz
  79. --‚àÜ                   TBD Consulting Group
  80. --‚àÜ                      (415) 462-6983
  81. --∆
  82. --‚àÜ                based on the seminal work of;
  83. --•
  84. --‚Ä¢         Jonathan Gibson    and           Ted Tripp
  85. --‚Ä¢           Jennie Gale            First Ammendment Computing
  86. --‚Ä¢         Form & Function                 408 458-5293
  87. --‚Ä¢          415*664-4010
  88. --•
  89. --∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆
  90. --∆
  91. --∆
  92. --∆
  93. --∆
  94.  
  95. on domenu menu                       --// Added by Medior, Inc. 4/16/90
  96.   global RPStackName
  97.   if menu is in "Home,Quit HyperCard" and RPStackName is not empty then
  98.     set cursor to watch
  99.     put RPStackName into shortname
  100.     repeat until offset(":",shortname) = 0
  101.       delete char 1 to offset(":",shortname) of shortname
  102.     end repeat
  103.     delete last char of shortname
  104.     answer "This will return to "&shortname&"." with "Cancel" or "OK"
  105.     if it is "Cancel" then exit domenu
  106.     set cursor to watch
  107.     lock screen
  108.     go RPStackName
  109.     unlock screen with dissolve
  110.     exit domenu
  111.   else pass doMenu
  112. end domenu
  113.  
  114.  
  115. on openstack
  116.   Global ButtonSND,ClickSND,place,startFlag,default
  117.   set lockscreen to true
  118.   put "MouseClick 1" into ButtonSND
  119.   put "DigiClick" into ClickSND
  120.   put "Lobby" into place
  121.   put "Yes" into startFlag
  122.   put "Info¬†Management" into default
  123.   hide message
  124.   hide menuBar
  125.   titleBar hide
  126.   put the long time into newTime
  127.   convert newTime to seconds
  128.   put cd fld "Old Time" of cd lobby into oldTime
  129.   put newTime into cd fld "New time" of cd lobby
  130.   --‚àÜ If longer than 9 hours, warn about B&W
  131.   if newTime > (oldTime + 32400) then
  132.     put true into tidyUpNow
  133.     if the loc of card window is not "0,0" then
  134.       answer "Make sure your monitor is set to B&W."
  135.     end if
  136.     put newTime into cd fld "Old Time" of cd lobby
  137.   else
  138.     put newTime into cd fld "Old Time" of cd lobby
  139.   end if
  140.   changeCurs 69 --‚àÜ change cursor to target
  141.   unlock screen with dissolve
  142. end openstack
  143.  
  144. on closeStack
  145.   get the freesize of this stack
  146.   if it > 100000 then doMenu "Compact Stack"
  147.   titleBar show
  148. end closeStack
  149.  
  150. on startup
  151.   Global ButtonSND,ClickSND,place
  152.   getHomeInfo
  153.   pass startUp -- to a startUp XCMD, if present
  154.   --‚Ä¢ for opening sequence, JON
  155. end startup
  156.  
  157. function SelectionAndHiliter
  158. --‚àÜ To get the number of a line clicked in a field and then highlight
  159. --‚àÜ the selected line, needs a button named the same as the field
  160. --‚àÜ name with "hiliter" appended.
  161. --‚àÜ First, check if the field is a scrolling field
  162. get the style of the target
  163. if it is "scrolling" then
  164.   put the scroll of the target into scrollLocation
  165. else
  166.   put "0" into scrollLocation
  167. end if
  168. --‚àÜ Next, get the vertical location of the field and adjust
  169. --‚àÜ for wideMargins (causes all lines to drop 4 pixels)
  170. put item 2 of rect of target into verticalLocation
  171. get wideMargins of the target
  172. if it is true then add 4 to verticalLocation
  173. --‚àÜ Compute the line number
  174. get item 2 of the clickloc - verticalLocation + ScrollLocation
  175. put 1 + it div the textHeight of target into lineNumber
  176. --‚àÜ Now, get the name of the hiliter button
  177. get the short name of the target
  178. put it into FieldName
  179. --‚àÜ Calculate where to place hilite button
  180. put 1 + (verticalLocation  + lineNumber * textHeight of target - ScrollLocation) - textHeight of target div 2 into adjustedVerticalLoc
  181. show cd button (FieldName & "hiliter") at item 1 of loc of cd button (FieldName & "hiliter"),adjustedVerticalLoc
  182. --‚àÜ return the line number to calling handler
  183. return lineNumber
  184. end SelectionAndHiliter
  185.  
  186. Function theChar x
  187. global right, left, ts, margin
  188. put empty into chnum
  189. put right-left into temp
  190. put (temp div TS) into int
  191. put left+margin into range1
  192. put range1 + TS into range2
  193. repeat with z=1 to int
  194.   if x >= range1 and x< range2
  195.   then
  196.   put  z into chnum
  197.   return(chnum)
  198.   exit repeat
  199. else
  200.   put range2 into range1
  201.   put range1 + TS into range2
  202. end if
  203. end repeat
  204. end theChar
  205.  
  206. on theChoice fName, x, y, lnum, chnum, choice
  207.   put theLine(fName,y) into lnum
  208.   put theChar(x) into chnum
  209.   if chnum is empty
  210.   then exit theChoice
  211. else
  212.   put character chnum of line Lnum of field fname into Choice
  213. end if
  214. end theChoice
  215.  
  216. on ElevatorAction
  217.   --‚àÜ lobby is floor 0,
  218.   --‚àÜ foundation is floor 1, network services is 2, app is 3.
  219.   global floor,nextFloor,currentFloor,lastFloor
  220.   put character 1 of nextFloor into floorDestination
  221.   --‚àÜ Fix the line numbers and then floor #s so loops to work sanely
  222.   if floorDestination is 3 then
  223.     put 1 into adjDestination
  224.   else
  225.     if floorDestination is 2 then
  226.       put 2 into adjDestination
  227.     else
  228.       if floorDestination is 1 then
  229.         put 3 into adjDestination
  230.       else
  231.         put 4 into adjDestination
  232.       end if
  233.     end if
  234.   end if
  235.   if floor is 3 then
  236.     put 1 into adjFloor
  237.   else
  238.     if floor is 2 then
  239.       put 2 into adjFloor
  240.     else
  241.       if floor is 1 then
  242.         put 3 into adjFloor
  243.       else
  244.         put 4 into adjFloor
  245.       end if
  246.     end if
  247.   end if
  248.   --‚àÜ Going up‚Ķ
  249.   if floor < floorDestination then
  250.     repeat with x = adjFloor down to adjDestination
  251.       put currentFloor into lastFloor
  252.       put line x of cd fld "Destination" into currentFloor
  253.       set the highlite of cd button lastFloor to false
  254.       if x = adjFloor then
  255.       else
  256.         set lockscreen to true
  257.         play "22"
  258.         unlock screen with wipe down
  259.       end if
  260.       put currentFloor into cd fld "currentFloor"
  261.       set the highlite of cd button currentFloor to true
  262.       wait 30
  263.     end repeat
  264.     put floorDestination into floor
  265.   end if
  266.   --‚àÜ Going down‚Ķ
  267.   if floor > floorDestination then
  268.     repeat with y = adjFloor to adjDestination
  269.       put currentFloor into lastFloor
  270.       put line y of cd fld "Destination" into currentfloor
  271.       set the highlite of cd button lastFloor to false
  272.       if y = adjFloor then
  273.       else
  274.         set lockscreen to true
  275.         play "22"
  276.         unlock screen with wipe up
  277.       end if
  278.       put currentFloor into cd field "currentFloor"
  279.       set the highlite of cd button currentFloor to true
  280.       wait 30
  281.     end repeat
  282.     put floorDestination into floor
  283.   end if
  284. end ElevatorAction
  285.  
  286.